﻿namespace Bll.Supplier
{
    using IDal.Supplier;
    using Model.Supplier;
    using System;
    using System.Data;
    using DALFactory;
    public class SupplierBll
    {
        private static readonly ISupplier dal = DataAccess.CreateSupplier();

        public static void Add(SupplierEnt model)
        {
            dal.Add(model);
        }

        public static void Delete(int ID)
        {
            dal.Delete(ID);
        }

        public static DataTable GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        public static int GetMaxId(string swhere)
        {
            return dal.GetMaxId(swhere);
        }

        public static SupplierEnt GetModel(int ID)
        {
            return dal.GetModel(ID);
        }

        public static DataTable GetPageList(int PageSize, int PageIndex, string strWhere)
        {
            return dal.GetPageList(PageSize, PageIndex, strWhere);
        }

        public static DataTable SearchData(string strWhere)
        {
            return dal.SearchData(strWhere);
        }

        public static DataTable SearchData(int PageSize, int PageIndex, string strWhere)
        {
            return dal.SearchData(PageSize, PageIndex, strWhere);
        }

        public static int SearchDataCount(string strWhere)
        {
            return dal.SearchDataCount(strWhere);
        }

        public static void Update(SupplierEnt model)
        {
            dal.Update(model);
        }
    }
}

